//
//  SENavigationController.m
//  kuaiyi
//
//  Created by Alphts on 16/7/7.
//  Copyright © 2016年 Alphts. All rights reserved.
//

#import "SENavigationController.h"

@interface SENavigationController ()

@end

@implementation SENavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
  
}


- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    
    if (self.viewControllers.count > 0) {
        
        UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
        [leftBtn setImage:[UIImage imageNamed:@"JianTou"] forState:UIControlStateNormal];
        
        [leftBtn addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside];
        
        viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftBtn];
        
    }

    [super pushViewController:viewController animated:animated];
}

- (void)goBack{
    
    [self popViewControllerAnimated:YES];
}

@end













